import request from '@/utils/request'

// 获取消息列表
export const getMessages = () => {
  return request({
    url: '/api/messages',
    method: 'get'
  })
}

// 标记消息为已读
export const markMessageAsRead = (messageId) => {
  return request({
    url: `/api/messages/${messageId}/read`,
    method: 'put'
  })
}

// 删除消息
export const deleteMessage = (messageId) => {
  return request({
    url: `/api/messages/${messageId}`,
    method: 'delete'
  })
}

// 获取未读消息数量
export const getUnreadCount = () => {
  return request({
    url: '/api/messages/unread/count',
    method: 'get'
  })
} 